package com.wanxi.web.controller;

import com.wanxi.login.domain.dto.LoginDefaultDto;
import com.wanxi.user.domain.dto.UserInfoDto;
import com.wanxi.user.domain.entity.UserInfo;
import com.wanxi.user.domain.query.UserQuery;
import com.wanxi.user.domain.result.UserResult;
import com.wanxi.web.service.user.UserWebService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;

/**
 * ClassName: AdminUserController
 * Description:
 * date: 2022/1/13 11:04
 *
 * @author lxl
 * @version 1.0
 * @since JDK 1.8
 */

@Api(tags = "管理员用户接口")
@RestController
@RequestMapping("admin/user")
public class AdminUserController {


    @Resource
    private UserWebService service;

    /**
     * 后台查询用户信息
     * */
    @GetMapping("findAll")
   public UserResult<List<UserInfo>> findAll( UserQuery userQuery){
        return service.findAll(userQuery);
    }

    /**
     * 后台查询修改用户状态
     * */
    @PutMapping("updateById")
   public UserResult<String> updateById(LoginDefaultDto loginDefaultDto){
        return service.updateDefaultId(loginDefaultDto);
    }

}
